import {postForm, postJson} from './../config/httpService';

// let baseUrl = 'http://www.hleason.com/';
// let baseUrl = 'http://120.79.165.130:3369/';
let baseUrl = 'http://www.zhrlgx.com:3379/'
let imgBaseUrl = 'http://renli.oss-cn-shenzhen.aliyuncs.com/';

export function getImgBaseUrl() {
    return imgBaseUrl;
};

export function userLogin(body) {
    return postForm(baseUrl + 'login/admin-login',body)
}

export function getIndexData() {
    return postForm(baseUrl + 'common/index')
}

export function getDataList(body) {
	return postForm(baseUrl + 'common/get-list-by-condition',body)
}

export function createData(body) {
	return postForm(baseUrl + 'common/update-or-create-data',body)
}

export function userInfo(body) {
    return postForm(baseUrl + 'back/user-info-cont', body)
}

export function uploadImg(body) {
    return postForm(baseUrl + 'base/oss-upload-file',body)
}

export function settingsList(body) {
    return postForm(baseUrl + 'common/get-info-by-id',body)
}

export function login(body) {
    return postForm(baseUrl + 'login/admin-login',body)
}

export function getPartnerData(body) {
    return postForm(baseUrl + 'common/partner',body)
}

export function getPlaceData(body) {
    return postForm(baseUrl + 'common/place',body)
}

export function getSelfData(body) {
    return postForm(baseUrl + 'common/self',body)
}

export function attribute(body) {
    return postForm(baseUrl + 'common/update-attributes',body)
}

export function auditSwitch(body) {
    return postForm(baseUrl + 'videos/modify-switch',body)
}

export function getAuditSwitch() {
    return postForm(baseUrl + 'videos/get-switch')
}

export function shareInfo(body) {
    return postForm(baseUrl + 'videos/get-videos-info',body)
}

export function shareInfoDel(id) {
    return postForm(baseUrl + 'videos/del',{id})
}

export function shareInfoEdit(body) {
    return postForm(baseUrl + 'videos/modify-type',body)
}

export function getAliCash(body) {
    return postForm(baseUrl + 'videos/get-ali-cash-record',body)
}

export function getWechatCash(body) {
    return postForm(baseUrl + 'videos/get-wechat-cash',body)
}

export function getRoleInfo(body) {
    return postForm(baseUrl + 'role-set/get-role-info',body)
}

export function setRoleInfo(body) {
    return postForm(baseUrl + 'role-set/role-set',body)
}

export function getProvinceList(body) {
    return postForm(baseUrl + 'role-set/get-province-list',body)
}

//区县
export function getTownList(body) {
    return postForm(baseUrl + 'role-set/get-country-list',body)
}
//市级
export function getCityList(body) {
    return postForm(baseUrl + 'role-set/get-city-list',body)
}
//合伙人
export function getPartnerList(body) {
    return postForm(baseUrl + 'role-set/get-partnership-list',body)
}
//个人
export function getPersonalList(body) {
    return postForm(baseUrl + 'role-set/get-personal-list',body)
}
//推广员
export function getSpreadList(body) {
    return postForm(baseUrl + 'role-set/get-spread-list',body)
}

export function firstRecommend(body) {
    return postForm(baseUrl + 'profit/first-recommend',body);
}

export function secondRecommend(body) {
    return postForm(baseUrl + 'profit/second-recommend',body);
}

export function thirdRecommend(body) {
    return postForm(baseUrl + 'profit/third-recommend',body);
}

export function forthRecommend(body) {
    return postForm(baseUrl + 'role-set/get-forth',body)
}

export function addUser(body) {
    return postForm(baseUrl + 'role-set/add-member',body)
}

export function setCompanyInfo(body) {
    return postForm(baseUrl + 'role-set/set-company-info',body)
}

export function getCompanyInfo(body) {
    return postForm(baseUrl + 'role-set/get-company-info',body)
}

export function getMyOrders(body) {
    return postForm(baseUrl + 'order/get-my-order-list',body)
}

export function auditOrder(body) {
    return postForm(baseUrl + 'order/auditing-order',body)
}

export function getMyRecepit(body) {
    return postForm(baseUrl + 'order/get-my-receipt',body)
}

export function setVoucher(body) {
    return postForm(baseUrl + 'cash-coupon/set-coupon',body)
}

export function editVoucher(body) {
    return postForm(baseUrl + 'cash-coupon/edit-set-coupon',body)
}

export function getVouchersList(body) {
    return postForm(baseUrl + 'cash-coupon/get-coupon-list',body)
}

export function cashAudit(body) {
    return postForm(baseUrl + 'personal/cash-auditing',body)
}

export function searchAccount(body) {
    return postForm(baseUrl + 'role-set/search-account',body)
}

export function dataEntry(body) {
    return postForm(baseUrl + 'role-set/add-account', body)
}

export function oldUserList(body) {
    return postForm(baseUrl + 'role-set/get-first-user-list',body)
}

export function editOldUserInfo(body) {
    return postForm(baseUrl + 'role-set/edit-user-base-info',body)
}

export function editAgentInfo(body) {
    return postForm(baseUrl + 'role-set/edit-agent-info',body)   
}

export function publishOrder(body) {
    return postForm(baseUrl + 'order/admin-publish-order',body)
}

export function getCashList(body) {
    return postJson(baseUrl + 'role-set/get-cash-record',body)
}

export function getUserList(body) {
    return postJson(baseUrl + 'personal/get-user-list',body)
}

export function getOneUserList(body) {
    return postJson(baseUrl + 'role-set/get-fine-first-list',body)
}

export function getTwoUserList(body) {
    return postJson(baseUrl + 'role-set/get-fine-second-list',body)
}

export function getThreeUserList(body) {
    return postJson(baseUrl + 'role-set/get-fine-third-list',body)
}

export function exitOrder(body) {
    return postJson(baseUrl + 'order/admin-cancel-order',body)
}

export function forceOrder(body) {
    return postJson(baseUrl + 'order/force-order-comment',body)
}